package com.ny.common.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 *
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200,"成功"),
    FAIL(201, "失败"),
    SERVICE_ERROR(2012, "服务异常"),
    DATA_ERROR(204, "数据异常"),
    LOGIN_AUTH(208, "未登陆"),
    PERMISSION(209, "没有权限"),
    CODE_600(600,"用户名或密码错误"),
    CODE_601(601,"用户已存在"),
    CODE_401(401,"无token,请重新登录"),
    CODE_402(402,"token验证失败，请重新登录"),
    CODE_403(403,"用户不存在，请重新登录")
    ;

    private Integer code;

    private String message;

    private ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
